{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## kNN的决策边界"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于kNN算法来说，k越小，决策边界越不规则，越过拟合。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets\n",
    "\n",
    "iris = datasets.load_iris()\n",
    "\n",
    "X = iris.data[:,:2]\n",
    "y = iris.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHelJREFUeJzt3X+MXfV55/H3M2M3dl2KN/KoNv6xjqOEPxIsTEZgzKpC\nYQMFmwRHOMVKGhl1YYmy3clSES2VaUfUUrRilWbISkGQqARBHbBrO1kPlGaboCZpbGlsLLsNJQKb\nxpjxYhLZBLCzeObZP+6d8fhwr8+5c75zzvec+3lJFnO/98y5zz1cHl/u+ZznmrsjIiL10lN2ASIi\nEp6au4hIDam5i4jUkJq7iEgNqbmLiNSQmruISA2puYuI1JCau4hIDam5i4jU0KysG5pZLzACHHP3\ndYn7rgW+CxxpLu1w9/svtL8FCxb48uXLOypWRKTb7du37w1370vbLnNzBwaAF4DfbXP/j5JN/0KW\nL1/OyMhIBw8vIiJm9m9Ztsv0sYyZLQHWAt/MU5SIiBQj62fuXwO+DIxfYJs1ZnbQzJ4xs4+02sDM\n7jSzETMbOXHiRKe1iohIRqnN3czWAa+7+74LbLYfWObuK4GvA7tabeTuD7t7v7v39/WlfmQkIiLT\nlOWd+zXAJ83sFeA7wMfN7PGpG7j7m+7+VvPnp4HZZrYgdLEiIpJNanN393vdfYm7LwduA37g7p+b\nuo2ZLTQza/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NAv7G3f8uUevTNM6ivwS8A9weYY2xHM8/AZ5o/i/6YeD2yI5l\n1jqjOJ7Nv8w/AfznKWvRHc8MdZZ+PN19r5ltp/ER0VngeeDh0MdTV6iKiNRQrT+WERHpVmruIiI1\npOYuIlJDau4iIjWk5i4iUkNq7iIiNaTmLiJSQ2ruIiI19P8BRBw7+Sdd2eUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10f34bdd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])\n",
    "plt.scatter(X[y==2,0], X[y==2,1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_decision_boundary(model, axis):\n",
    "    \n",
    "    x0, x1 = np.meshgrid(\n",
    "        np.linspace(axis[0], axis[1], int((axis[1]-axis[0])*100)).reshape(-1, 1),\n",
    "        np.linspace(axis[2], axis[3], int((axis[3]-axis[2])*100)).reshape(-1, 1),\n",
    "    )\n",
    "    X_new = np.c_[x0.ravel(), x1.ravel()]\n",
    "\n",
    "    y_predict = model.predict(X_new)\n",
    "    zz = y_predict.reshape(x0.shape)\n",
    "\n",
    "    from matplotlib.colors import ListedColormap\n",
    "    custom_cmap = ListedColormap(['#EF9A9A','#FFF59D','#90CAF9'])\n",
    "    \n",
    "    plt.contourf(x0, x1, zz, linewidth=5, cmap=custom_cmap)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### k = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnX+M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aq+F8CDAJ5KRFxrPqSqqwCsBfAFEbk6RS3TYdKZ9piWAbwfwNdV9QoAZwD8\n14Q12GCjM+2xnEBEzgPwSQCPp6XBBoPO1MdTRN6F6gx+BYALAMwRkVuj9hv3DP8qAJ8Ukd8B+C6A\na0WkuZzeEQDLGh4vrbUlhVGjelQ+ovbOD1U9DuCfAKxu2iXt8QRg1unBmB4GcFhVX6w93oaqsTbi\nw1gadXowlo2sBbBHVY+12ObDeNYJ1OnJeP4HAAdU9Q1V/SOqBSqvbNon9HjGaviqereqLlXVC1H9\n+PRjVW1+l/o+gM/UvnFeg+pHl6E4dYXVKJ6UjxCROSLSWf8dwMcxteJoquNpqzPtMVXVowAOicgl\ntaaPAni1abfUx9JGZ9pj2cR/RPAySerj2UCgTk/G8yCANSLyJzUtHwUw2LRP6PE0llaIAxH5PDBR\nmmEA1W+b9wP4A4DPpqGpmSaN7ZaPcM35AP6p9losA/gHVf0XD8fTRqcPY3oXgMdqH+9/C+CzHo6l\njU4fxrL+5v4xAH/e0ObdeFroTH08VfVFEdmG6vLSGICXAWyNOp4srUAIIQWBV9oSQkhBoOETQkhB\noOETQkhBoOETQkhBoOETQkhBoOETQkhBoOETQkhB+P9pC37R6gzZmQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10f4753c8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "\n",
    "knn_clf_1 = KNeighborsClassifier(n_neighbors=1)\n",
    "knn_clf_1.fit(X, y)\n",
    "\n",
    "plot_decision_boundary(knn_clf_1, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])\n",
    "plt.scatter(X[y==2,0], X[y==2,1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### k = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2QVXeZJ/Dv0/cS6EBDGxPSBIKwFYwmqKAUw4K6SXwp\ngSiUxp1sJb7VrGhKLTLOjLsRy7yUWWtqplx7kp2kUHdNNhmtvBms0FjxBdcIRVJAMEI6joyY8NJA\nEqahGxpC9332j3tv972n7+nf79zz9jv3fD9VXel7zrnnPPekefrXv/Oc54iqgoiIWl9b2gEQEVEy\nmPCJiHKCCZ+IKCeY8ImIcoIJn4goJ5jwiYhywjrhi0hBRJ4XkacarLtGRE6KyJ7K1zejDZOIiMIq\nBth2PYBeANN91j+jqteHD4mIiOJgNcIXkTkAVgP4frzhEBFRXGxH+N8F8DUAHRNss1xEXgBwGMDf\nquo+7wYisg7AOgCYOnnyexZ0dQUMl4jCer39zWmHQCEcfGn3a6p6STPvNSZ8EbkewHFV3SUi1/hs\nthvAXFUdFJFVAJ4EsMC7kapuBLARABbPm6dbN2xoJmYiakLnTQV077s57TAopFuXTn652ffaTOms\nAPAxEfkzgB8DuE5EHqrdQFVPqepg5fseAJNE5OJmgyKi6DHZkzHhq+ptqjpHVecBuBHAr1S17idH\nRLpERCrfL63s9/UY4iWiJjyw6DNph0AOCFKlU0dEvggAqno/gBsA3CIiwwCGANyobMNJ5AQme6oK\nlPBV9dcAfl35/v6a5fcCuDfKwIhq9Qy0454THTg6XEBXcQRfuWgAqzqG0g7LeUz2VIt32pLzegba\ncderM9A3XIRC0DdcxF2vzkDPQHvaoTmt86ZC2iGQY5qe0iFKyj0nOnBW68cmZ7UN95zo4CjfxwOL\nPgOMK4ymvOMIn5x3dLjxSNVved5xGof8MOGT87qKI4GW5xmTPU2ECZ+c95WLBjBFSnXLpkgJX7lo\nIKWIiLKJc/jkvOo8Pat0/PEuWrL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AAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10fb86748>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "knn_clf_5 = KNeighborsClassifier(n_neighbors=5)\n",
    "knn_clf_5.fit(X, y)\n",
    "\n",
    "plot_decision_boundary(knn_clf_5, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])\n",
    "plt.scatter(X[y==2,0], X[y==2,1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### k = 25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9sHPWdN/D3x7smNo4Tw4XgECclEj8KCRAgyuVJei1t\nKSoOT4NaOPEISqn0XK5Vi8xxp+rhUgFFRdWhR1x9IJGm7dPCwbUHIZdUxUGUKy2QKCAnoSHBwOWa\nkh/YCTQ4cRwnZL2f54/dtdebHX+/uzM7852d90uy8H5nduYzw+az45nPfEZUFUREVP8aog6AiIjC\nwYRPRJQQTPhERAnBhE9ElBBM+ERECcGET0SUENYJX0RSIrJdRH5dZto1InJERN7I/9wbbJhERORX\nuoJ5uwD0AZjmMf0VVb3Bf0hERFQLVkf4ItIBYDmAn9Q2HCIiqhXbI/wfAvgOgNZJ5lkqIjsAHADw\nD6q6q3QGEVkJYCUAtEyZcvWF7e0VhktUf/7c/BdRh0Axsu/tbR+q6jnVvNeY8EXkBgCHVHWriFzj\nMds2AHNV9ZiIdAJYD+DC0plUdQ2ANQBw5fnn60urVlUTM1FdeXzh16IOgWLkrsVT3qv2vTandJYB\n+JKI/AnALwF8TkSeLJ5BVY+q6rH87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qnkKuQeXSknkq3p81Tfiqeo+qdqjq+cj9+fRbVS39lvoVgNvzV5yX\nIPenS38t46o0RnGkfYSItIhIa+F3ANfh9I6jke5P2zij3qeqOgBgn4hcnB/6PIC3SmaLfF/axBn1\nvizxv+B9miTy/VnEM05H9udeAEtE5Mx8LJ8H0FcyT8X70+YBKIETkW8AY60ZepC72rwbwHEAX48i\nplIlMVbbPiJo5wL4j/xnMQ3g31T1eQf3p02cLuzTOwE8lf/z/o8Avu7gvrSJ04V9Wfhy/wKAvy0a\nc25/WsQZ+f5U1ddEZC1yp5cyALYDWON3f7K1AhFRQvBOWyKihGDCJyJKCCZ8IqKEYMInIkoIJnwi\nooRgwiciSggmfCKihPj/BGkHGUy6vJEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1106ae278>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "knn_clf_25 = KNeighborsClassifier(n_neighbors=25)\n",
    "knn_clf_25.fit(X, y)\n",
    "\n",
    "plot_decision_boundary(knn_clf_25, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])\n",
    "plt.scatter(X[y==2,0], X[y==2,1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### k = 100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+QHPV55/H3s7OLVlpWrDkhJBAy1JlgLMU2kUrhUM5F\nbMeFJMpQMaR8ZTuxq86KXYaS46Ry5+DChIJKJXeVigJVJop9FxOcOEgQcFkrF/4ZMDpBSQJjwdox\nsQySWEm25ZVWqxVod577Y2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VwCDJjZh6PO2+4z/LXA+83sZ8BXgXeb2UM1+xwCLqt6vKw8lpTA\nGD1F7SPKv/lx96PAvwJranbp9PEEguNMwTE9CBx092fKj7dRSqzV0nAsA+NMwbGstg7Y6+5H6mxL\nw/GsaBhnSo7ne4H97v5zdz9DqUHldTX7NH0825rw3f2z7r7M3S+n9OfTd9y99rfU14DfL19xvpbS\nny6j7Yyr2RgtJe0jzGzAzAYr3wPv49yOox09nmHj7PQxdffDwAEzu6o89B7gpZrdOn4sw8TZ6WNZ\n47/ReJmk48ezSsM4U3I8XwWuNbMF5VjeA4zU7NP08QxzA5TYmdknYKY1wzClq80vA6eAj3Uiplo1\nMbbaPiJuFwP/Wv5Z7AX+yd2/kcLjGSbONBzT24GvlP+8/ynwsRQeyzBxpuFYVn65/w7wh1VjqTue\nIeLs+PF092fMbBul5aUp4DlgS9TjqdYKIiI5oU/aiojkhBK+iEhOKOGLiOSEEr6ISE4o4YuI5IQS\nvohITijhi4jkxP8H0BhIBRoxi9MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10fb42668>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "knn_clf_100 = KNeighborsClassifier(n_neighbors=100)\n",
    "knn_clf_100.fit(X, y)\n",
    "\n",
    "plot_decision_boundary(knn_clf_100, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])\n",
    "plt.scatter(X[y==2,0], X[y==2,1])\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
